package cn.tedu.charging.order.mqtt;

import cn.tedu.charging.order.dao.mapper.OrderFailMapper;
import cn.tedu.charging.order.dao.mapper.OrderSuccessMapper;
import cn.tedu.charging.order.dao.repository.ChargingProcessRepository;
import cn.tedu.charging.order.feign.CostClient;
import com.alibaba.nacos.shaded.org.checkerframework.checker.units.qual.A;
import org.junit.jupiter.api.Order;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.concurrent.CompletionStage;

@Component
public class MqttContext {
    @Autowired    // 为什么可以直接调用：因为都在容器当中
    private OrderSuccessMapper orderSuccessMapper;
    @Autowired
    private OrderFailMapper orderFailMapper;

    @Autowired
    private CostClient costClient;

    @Autowired
    private ChargingProcessRepository chargingProcessRepository;

    public ChargingProcessRepository getChargingProcessRepository() {
        return chargingProcessRepository;
    }

    public CostClient getCostClient() {
        return costClient;
    }

    // 这里添加一个 Getter 的方法
    public OrderSuccessMapper getOrderSuccessMapper() {
        return orderSuccessMapper;
    }

    public OrderFailMapper getOrderFailMapper() {
        return orderFailMapper;
    }
}
